package com.cn.wanxi.service;

import com.cn.wanxi.dao.IStudentDao;
import com.cn.wanxi.entity.StudentEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @version 1.0
 * @author:林建权
 * @Date:2020/3/17 12:35
 */
@Service
public class StudentService {

    @Autowired
    private IStudentDao studentDao;

    public StudentEntity infoInit(Integer id){
        StudentEntity studentEntity = studentDao.findStudentById(id);
//        try{
//            studentEntity = studentDao.findStudentById(id);
//            System.out.println(studentEntity);
//        }catch (Exception e){
//            System.out.println("没有这个学生信息！");
//        }
        return studentEntity;
    }

}
